<template>
  <el-table :data="processData" border :height="500">
    <el-table-column align="center" prop="shopName" label="排名">
    </el-table-column>
    <el-table-column align="center" prop="productType" label="商品款号">
    </el-table-column>
    <!-- <el-table-column
      align="center"
      prop="selfOperatedReturnAmount"
      label="商品图片"
    > 
    </el-table-column>-->
    <el-table-column align="center" prop="salesAmount" label="销售额">
    </el-table-column>
    <el-table-column
      align="center"
      prop="selfOperatedRefundRate"
      label="同期销售额"
    >
    </el-table-column>
    <el-table-column align="center" prop="saleAmountRatio" label="销额占总比">
      <template slot-scope="scope"> {{ scope.row.saleAmountRatio }}% </template>
    </el-table-column>
    <el-table-column align="center" prop="salesQuantity" label="销售数量">
    </el-table-column>
    <el-table-column align="center" prop="saleQuantityRatio" label="销量占总比">
      <template slot-scope="scope">
        {{ scope.row.saleQuantityRatio }}%
      </template>
    </el-table-column>
    <el-table-column
      align="center"
      prop="channelOnSaleQuantity"
      label="平台在销数量"
    >
    </el-table-column>
    <el-table-column align="center" prop="totalInventory" label="库存总量">
    </el-table-column>
    <el-table-column
      align="center"
      prop="salesRecentSevenDays"
      label="近7天销量"
    >
    </el-table-column>
    <!-- <el-table-column
      align="center"
      prop="selfOperatedVideoSalesAmount"
      label="毛利额"
    >
    </el-table-column> -->
    <el-table-column align="center" prop="discountRate" label="折扣率">
      <template slot-scope="scope"> {{ scope.row.discountRate }}% </template>
    </el-table-column>
    <el-table-column
      align="center"
      prop="selfOperatedVideoReturnAmount"
      label="是否新品"
    >
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  props: {
    processData: {
      type: Array,
      default: () => [],
    },
  },
  methods: {
    tableRowClassName({ row, column, rowIndex, columnIndex }) {
      if (column.label.includes("自营")) {
        return "background:#ed7d31 !important;color:#fff ";
      } else if (column.label.includes("短视频")) {
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label.includes("直播")) {
        return "background:#ed7d31 !important;color:#fff ";
      } else if (column.label.includes("商品卡")) {
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label.includes("其他")) {
        return "background:#ed7d31 !important;color:#fff ";
      }
    },
  },
};
</script>




























































